package server.maps;

import client.MapleCharacter;
import client.MapleClient;
import handling.world.MapleParty;
import java.awt.Point;
import org.apache.mina.core.session.IoSession;
import tools.MaplePacketCreator;

public class MechDoor extends MapleMapObject {

    private int owner;
    private int partyid;
    private int id;

    public MechDoor(MapleCharacter owner, Point pos, int id) {
        this.owner = owner.getId();
        this.partyid = (owner.getParty() == null ? 0 : owner.getParty().getId());
        setPosition(pos);
        this.id = id;
    }

    public void sendSpawnData(MapleClient client) {
        client.getSession().write(MaplePacketCreator.spawnMechDoor(this, false));
    }

    public void sendDestroyData(MapleClient client) {
        client.getSession().write(MaplePacketCreator.removeMechDoor(this, false));
    }

    public int getOwnerId() {
        return this.owner;
    }

    public int getPartyId() {
        return this.partyid;
    }

    public int getId() {
        return this.id;
    }

    public MapleMapObjectType getType() {
        return MapleMapObjectType.DOOR;
    }
}

/* Location:           C:\Users\文炳\Desktop\CXFBY\114Maplewing.jar
 * Qualified Name:     server.maps.MechDoor
 * JD-Core Version:    0.6.2
 */